<?php

class Application_Form_NewTurn extends Zend_Dojo_Form
{
	protected $_land = array();
	protected $_haefen = array();
	protected $_stadt = array();
	protected $_boot = array();
	
	public function getLand() {
		return $this->_land;
	}
	
	public function setLand($land){
		$this->_land = $land;
	}
	
	public function getHaefen() {
		return $this->_haefen;
	}

	public function getStadt() {
		return $this->_stadt;
	}

	public function setHaefen($_haefen) {
		$this->_haefen = $_haefen;
	}

	public function setStadt($_stadt) {
		$this->_stadt = $_stadt;
	}
	
	public function getBoot() {
		return $this->_boot;
	}
	
	public function setBoot($boot){
		$this->_boot = $boot;
	}

    public function init()
    {
        $this->setName("NewTurn");
        $this->setMethod('post');

        
        $name = new Zend_Form_Element_Text('name');
        $name ->setLabel('Name:')
        ->setRequired(true);

        
        
        
        
        $land = new Zend_Form_Element_Select('land');
        $land ->setLabel('Land:')
        	->addMultiOptions( $this->_land
        );
        
        $stadt = new Zend_Form_Element_Select('stadt');
        $stadt ->setLabel('Stadt:')
        ->addMultiOptions( $this->_stadt
        );
        
        $haefen = new Zend_Form_Element_Select('haefen');
        $haefen ->setLabel('Haefen:')
        ->addMultiOptions( $this->_haefen
        );

        
        
        
        
        $landziel = new Zend_Form_Element_Select('landziel');
        $landziel ->setLabel('Land:')
        ->addMultiOptions( $this->_land
        );
        
        $stadtziel = new Zend_Form_Element_Select('stadtziel');
        $stadtziel ->setLabel('Stadt:')
        ->addMultiOptions( $this->_stadt
        );
        
        $haefenziel = new Zend_Form_Element_Select('haefenziel');
        $haefenziel ->setLabel('Haefen:')
        ->addMultiOptions( $this->_haefen
        );
        
        
        
        
        
        $boot = new Zend_Form_Element_Select('boot');
        $boot ->setLabel('Boot:')
        ->addMultiOptions( $this->_boot
        );
        
        
        $startdatum = new Zend_Dojo_Form_Element_DateTextBox('startdatum');
        $startdatum->setLabel('Startdatum*')
        ->setRequired(true);
        
        
        $zieldatum = new Zend_Dojo_Form_Element_DateTextBox('enddatum');
        $zieldatum->setLabel('Zieldatum*')
        ->setRequired(true);
        
        
        
		// create submit button
		$submit = new Zend_Form_Element_Submit('submit');
		$submit->setLabel('Submit')
		->setOptions(array('class' => 'submit'));
		
		
		
		
		
        // attach elements to form
        $this
        		->addElement($name)
        		->addElement($land)
        		->addElement($stadt)
        		->addElement($haefen)
        		->addElement($landziel)
        		->addElement($stadtziel)
        		->addElement($haefenziel)
        		->addElement($boot)
        		->addElement($startdatum)
        		->addElement($zieldatum)
        		->addElement($submit);
	}

}

